﻿

Public Class ViewRoster
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
    End Sub

    Protected Sub backButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles backButton.Click
        Response.Redirect("InstructorHome.aspx")
    End Sub
   
    
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
        SqlDataSource1.UpdateParameters(0).DefaultValue = GridView1.SelectedRow.Cells(1).Text
        Select Case (GridView1.SelectedRow.Cells(4).Text)
            Case "t"
                SqlDataSource1.UpdateParameters(1).DefaultValue = "f"
            Case "f"
                SqlDataSource1.UpdateParameters(1).DefaultValue = "t"
            Case Else
                SqlDataSource1.UpdateParameters(1).DefaultValue = "t"
        End Select
        SqlDataSource1.Update()
        GridView1.DataBind()

    End Sub
End Class